from selenium.webdriver.common.by import By


class MyStudentsPageLocator:
    """TS班主任工作平台我的学员页面定位"""
    nav_my_students_loc = (By.XPATH, "//p[text()='我的学员']/..")  # 导航栏-我的学员
    nav_my_students_state_loc = (By.XPATH, "//p[text()='我的学员']/..//ion-icon")  # 导航栏-我的学员,验证是否展台状态的定位元素
    nav_english_students_loc = (By.XPATH, "//p[text()='英文课程学员']/..")  # 导航栏-我的学员-英文课程学员
    search_loc = (By.XPATH, "//div[text()=' 搜索 ']")  # 英文课程学员页面- 搜索按钮
    # 英文课程学员页面- 列表数据学员详情链接列
    row_link_loc = (By.XPATH, "//datatable-scroller//datatable-body-row//span[contains(.,'{}')]")
    stu_detail_class_loc = (By.XPATH, "//ion-label[contains(.,'班级')]/..")  # 详情栏-班级tab
    stu_detail_order_loc = (By.XPATH, "//ion-label[contains(.,'订单')]/..")  # 详情栏-订单tab
    stu_detail_more_loc = (By.XPATH, "//ion-label[contains(.,'更多信息')]/..")  # 详情栏-更多信息tab

    eng_stu_lst_data_loc = (By.XPATH, "//datatable-scroller")  # 英文课程学员列表数据

    # 点击学员详情右侧弹窗
    eng_having_class_loc = (By.XPATH, "//div[@class='contentWrapping card']//ion-label[text()='开课中']/..")  # 开课中
    eng_not_class_loc = (By.XPATH, "//div[@class='contentWrapping card']//ion-label[text()='未开课']/..")  # 未开课
    eng_Finished_class_loc = (By.XPATH, "//div[@class='contentWrapping card']//ion-label[text()='已结课']/..")  # 已结课
    class_tab_table_loc = (By.XPATH, "//div[@class='multiContent_wrap ng-star-inserted']")  # 详情窗口班级信息列表数据
    order_tab_table_loc = (By.XPATH, "//div[@class='multiContent_order_wrap ng-star-inserted']")

    # 学员详情-详情栏-更多信息页面
    share_poster_loc = (By.XPATH, "//div[text()='分享海报']")  # 分享海报
    backspace_loc = (By.XPATH, "//ion-icon[@name='backspace']")  # 关闭分享海报
    create_order_loc = (By.XPATH, "//div[text()='下单']")  # 下单
    user_info_div_loc = (By.XPATH, "//div[@class='user-info']")  # 用户名区域
    job_completion_loc = (By.XPATH, "//span[text()='作业完成情况']") # 作业完成情况
    job_cancel_loc = (By.XPATH, "//button[text()='取消']")


